<template>
  <ElDescriptions title="详情" border>
    <template v-for="item in option">
      <ElDescriptionsItem v-if="!item.hidden" :span="item.span??3">
        <template #label>{{ item.label }}</template>
        {{ data[item.field] }}
      </ElDescriptionsItem>
    </template>
  </ElDescriptions>
</template>
<script setup lang="jsx">
import { ElDescriptions, ElDescriptionsItem } from "element-plus";
import { defineProps } from "vue";
const props = defineProps({
  option: {
    type: Array,
    default: [],
  },
  data: {
    type: Object,
    defalut: {},
  },
});
</script>
